import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-10-19
 * Time: 11:25
 */
public class isPrime {
    //素数因子
    public static void isPrime(int num){
        int n = num;
        if(num<2){
            System.out.println("无素数因子");
            return;
        }
        for(int i = 2; i <= n;i++){
            while(n%i == 0){
                System.out.print(i+" ");
                n/=i;
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        isPrime(num);
    }

}
